﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ch03_1
{
    class Class2
    {
        static void Main(string[] args)
        {
            //三目运算符：表达式1?表达式2:表达式3
            //条件表达式?值1:值2
            //条件为真，则三目运算符返回值1，否则返回值2

            Console.Write("请输入你的成绩：");
            double score = double.Parse(Console.ReadLine());

            //string msg = score >= 60 ? "恭喜你，及格啦！" : "很遗憾，不及格！";
            //Console.WriteLine(msg);

            Console.WriteLine(score >= 60 ? "恭喜你，及格啦！" : "很遗憾，不及格！");

        }
    }
}
